/////@file GUIManager.cpp source file for class CGUIManager
/////@author	charlie Tan: gths123@gmail.com
//#include "GUIManager.h"
//
//void CGUIManager::initializeGUI()
//{
//
//	m_DXUTSettingsDlg.Init(&m_DXUTDialogResourceManager);
//	m_DXUTSampleUI.Init(&m_DXUTDialogResourceManager);
//
//	m_DXUTDialogResourceManager.OnD3D9CreateDevice(m_pD3DDevice);
//	m_DXUTSettingsDlg.OnD3D9CreateDevice(m_pD3DDevice);
//
//	m_DXUTDialogResourceManager.OnD3D9ResetDevice();
//	m_DXUTSettingsDlg.OnD3D9ResetDevice();
//	
//	m_pSharpShooterDevice->addEvent(this);
//}
//
//CGUIManager::CGUIManager(CD3D9Device* pdevice)
//:m_pD3DDevice(pdevice->getD3DDevice()),m_pSharpShooterDevice(pdevice)
//{
//	initializeGUI();
//	
//}
//
//void CGUIManager::setEventHandler(PCALLBACKDXUTGUIEVENT eventFunction,void *pUserContext)
//{
//	m_DXUTSampleUI.SetCallback(eventFunction);
//}
//
//CGUIManager::~CGUIManager()
//{
//
//	m_DXUTDialogResourceManager.OnD3D9LostDevice();
//	m_DXUTSettingsDlg.OnD3D9LostDevice();
//
//	m_DXUTDialogResourceManager.OnD3D9DestroyDevice();
//	m_DXUTSettingsDlg.OnD3D9DestroyDevice();
//}
//
//CDXUTDialog* CGUIManager::getGUISets()
//{
//	return &m_DXUTSampleUI;
//}
//
//void CGUIManager::render(float nowTime)
//{
//	if (SUCCEEDED(m_pSharpShooterDevice->getD3DDevice()->BeginScene()))
//	{
//		m_DXUTSampleUI.OnRender(nowTime);
//		m_pSharpShooterDevice->getD3DDevice()->EndScene();
//	}
//	m_pSharpShooterDevice->getD3DDevice()->Present(NULL,NULL,NULL,NULL);
//	
//	
//}
//bool CGUIManager::doEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,bool* pbNoFurtherProcessing)
//{
//
//	*pbNoFurtherProcessing = m_DXUTDialogResourceManager.MsgProc( hWnd, uMsg, wParam, lParam );
//	if( *pbNoFurtherProcessing ) return true;
//
//
//	if( m_DXUTSettingsDlg.IsActive() )
//	{
//		m_DXUTSettingsDlg.MsgProc( hWnd, uMsg, wParam, lParam );
//		return true;
//
//	}
//
//	*pbNoFurtherProcessing = m_DXUTSampleUI.MsgProc( hWnd, uMsg, wParam, lParam );
//	if( *pbNoFurtherProcessing ) return true;
//	return false;
//}
